package com.zbc.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 空间用户关联表
 * @author fangyu
 * @version v1.0.0
 * @since 2025/9/2 14:48
 */
@Data
@TableName(value = "space_user")
public class SpaceUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 空间 id
     */
    @TableField(value = "space_id")
    private Long spaceId;

    /**
     * 用户 id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 用户在该空间的角色: viewer/editor/admin
     */
    @TableField(value = "space_role")
    private String spaceRole;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;
}